/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * 
 */
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Employee {
    private String Name;
    private String Address;
    private String PhoneNum;
    public Employee(){

    }
    public Employee(String N,String Add,String PN){
        Name=N;
        Address=Add;
        PhoneNum=PN;
    }
    public void setAddress(String add)
    {
        this.Address=add;
    }
    public void setPhone(String phone)
    {
        this.PhoneNum=phone;
    }
    public String getName(){
        return Name;
    }
    public String getAddress(){
        return Address;
    }
    public String getPhone(){
        return PhoneNum;
    }
    public String StandalizedAdd(String Add,String strsearch,String strreplace){
        //Pattern ptn;
        //Matcher mchResult;
        String strNew="";
        String strSearch=strsearch;
        String strText=Add;
        String strReplace=strreplace;
       // final int flg=Pattern.CASE_INSENSITIVE;
        Pattern ptn=Pattern.compile(strSearch, Pattern.CASE_INSENSITIVE);
        Matcher mchResult=ptn.matcher(strText);
        while(mchResult.find()){
            //mchResult.start();
             strNew=mchResult.replaceAll(strReplace);
        }
        //String strNew=mchResult.replaceAll(strReplace);
        return strNew;
        //System.out.print("The Name of the employee is: "+emp.Name);
        //System.out.print("The Address of the employee after standalization"+strNew);

    }
    public String StandalizePhone(String phonenum){
        //Matcher mchResult;
        String strSearch="";
        String strText=phonenum;
        String strReplace="";
        //final int flg=Pattern.CASE_INSENSITIVE;
        Pattern ptn=Pattern.compile(strSearch, Pattern.CASE_INSENSITIVE);
        Matcher mchResult=ptn.matcher(strText);
        while(mchResult.find()){
            mchResult.start();
        }
        String strNew=mchResult.replaceAll(strReplace);
        return strNew;
    }

}
